package com.hqu.dao;

import com.hqu.entity.Course;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;


public interface CourseRepository extends CrudRepository<Course,Integer> {

//    @Query("select c from t_course c where t_course.c_id = ?")
//    Course findCourseByCId(Integer cId);
//    Course findCourseByStudentId(String id);
    @Query(value = "select courseName from Course")
    List<String> findAllCoursesName();

    Course findCourseByCourseName(String courseName);
//    Course findCourseByCId(Integer id);
}
